package com.dyrs.delaytaskservice;

import com.alibaba.nacos.spring.context.annotation.config.NacosPropertySource;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestTemplate;


@SpringBootApplication
@NacosPropertySource(dataId = "default-setting.properties", autoRefreshed = true) //Nacos conif Data ID
@MapperScan("com.dyrs.delaytaskservice.mapper") //mybatis 扫描的mapper
public class Application {

    @LoadBalanced
    @Bean
    public RestTemplate restTemplate() {
        return new RestTemplate();
    }


    public static void main(String[] args) {
        SpringApplication.run(Application.class, args);
    }

}
